#ifndef CPP_HANDLER_H
#define CPP_HANDLER_H

#include <Global.h>
#include <MiniGui.h>

class Message;

//@brief 消息处理
//@author cvte
class Handler {
   private:
    /* data */
   public:
    Handler(/* args */);
    ~Handler();

    Message& obtainMessage();
    Message& obtainMessage(int what);
    Message& obtainMessage(int what, int arg1, int arg2, long obj);

    bool sendEmptyMessageDelayed(int what, long delayMillis);
    bool sendEmptyMessage(int what);
    bool sendMessageDelayed(Message& msg, long delayMillis);
    bool sendMessage(Message& msg);

    virtual void handleMessage(Message& message) = 0;

};

#endif /* CPP_HANDLER_H */